package com.xxzb.pack0824.线程池;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

public class ThreadPoolTask implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        int sum=0;
        for (int i = 0; i < 100; i++) {
            sum+=i;
            System.out.println(Thread.currentThread().getName()+":"+i);
            TimeUnit.MILLISECONDS.sleep(10);
        }
        return sum;
    }
}
